<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>
        管理中心 -
    </title>
    <meta name="robots" content="noindex, nofollow" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="js/jquery/uploadify/uploadify.css"/>
    <link href="styles/general.css" rel="stylesheet" type="text/css" /><link href="styles/main.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript" src="js/jquery/uploadify/jquery.min.js"></script>
     <script src="js/jquery/uploadify/jquery.uploadify.js" type="text/javascript"></script>
    <script src="js/utils.js" type="text/javascript"></script>
    
    
    <link rel="stylesheet" type="text/css" href="http://ajax.pupkk.com/dojo/1.7.5/dojo/resources/dojo.css" />
	<link rel="stylesheet" type="text/css" href="http://ajax.pupkk.com/dojo/1.7.5/dijit/themes/tundra/tundra.css" />
	<script src="http://ajax.pupkk.com/dojo/1.7.5/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
    <script type="text/javascript">
	dojo.require("dojo.parser");
	dojo.require("dijit.form.DateTextBox");
	dojo.require("dijit.form.FilteringSelect");
	function validate()
	{
		return formvalidator("all");
	}
	function formvalidator(obj)
	{
		var controlId = "all";
		 if (typeof(obj) != "string" )
		 {
			 controlId = obj.id;
		 }
		if(controlId=="all" || controlId=="model.appname")
		{
			if(Utils.trim(document.getElementById("model.appname").value)=="")
			{
				document.getElementById("CompareValidator1").style.visibility="visible";
				return false;
			}
			else
			{
				document.getElementById("CompareValidator1").style.visibility="hidden";
			}
		}
		if(controlId=="all" || controlId=="model.apppackage")
		{
			if(Utils.trim(document.getElementById("model.apppackage").value)=="")
			{
				document.getElementById("CompareValidator4").style.visibility="visible";
				return false;
			}
			else
			{
				document.getElementById("CompareValidator4").style.visibility="hidden";
			}
		}
		$("input[type=submit]").val("正在提交。。。。").attr("disabled",true);
		return true;
	}
	function changeapp()
	{
		if(dijit.byId("model.appnumber").get('value')!="")
		{
			$.get("appchannelapk_changeapp.do?model.appnumber="+dijit.byId("model.appnumber").get('value'), 
     	           function(data) 
     	           { 
     	            	  document.getElementById("appversiondiv").innerHTML=data;
     	           });
		}
	}
	function changechannel()
	{
		if(dijit.byId("model.channelid").get('value')!="")
		{
			$.get("appchannelapk_changechannel.do?channelid="+dijit.byId("model.channelid").get('value'), 
     	           function(data) 
     	           { 
     	            	  document.getElementById("projectdiv").innerHTML=data;
     	           });
		}
	}
	function changeappversion()
	{
		if(document.getElementById("model.appversionid").value!="")
		{
			$.ajax({    
			    url:'appchannelapk_changeappversion.do?appversion.id='+document.getElementById("model.appversionid").value,    
			    type: 'GET',    
			    dataType: 'xml',    
			    timeout: 1000,    
			    error: function(xml){    
			        alert('Error loading XML document'+xml);    
			    },    
			    success: function(xml){    
			        $(xml).find("appversion").each(function(i){ 
			        	var appversionnumber_value=$(this).children("appversionnumber").text();
			            if(appversionnumber_value!=null && appversionnumber_value!="")
			            	document.getElementById("model.appversionnumber").value=appversionnumber_value;
			            var id_value=$(this).children("id").text(); 
			            var appnumber_value=$(this).children("appnumber").text();
			            var appname_value=$(this).children("appname").text();
			            if(appname_value!=null && appname_value!="")
			            	document.getElementById("model.appname").value=appname_value;
			            var cpid_value=$(this).children("cpid").text();
			            if(cpid_value!=null && cpid_value!="")
			            	document.getElementById("model.cpid").value=cpid_value;
			            var categoryparentid_value=$(this).children("categoryparentid").text();
			            if(categoryparentid_value!=null && categoryparentid_value!="")
			            	document.getElementById("model.categoryparentid").value=categoryparentid_value;
			            var categoryid_value=$(this).children("categoryid").text();
			            if(categoryid_value!=null && categoryid_value!="")
			            	document.getElementById("model.categoryid").value=categoryid_value;
		            	
			            var apppackage_value=$(this).children("apppackage").text();
			            if(apppackage_value!=null && apppackage_value!="")
			            	document.getElementById("model.apppackage").value=apppackage_value;
		            	
			            var appversion_value=$(this).children("appversion").text();
			            if(appversion_value!=null && appversion_value!="")
			            	document.getElementById("model.appversion").value=appversion_value;
		            	
			            var appiconname_value=$(this).children("appiconname").text();
			            var reiconname_value=$(this).children("reiconname").text();
			            var appiconsrc_value=$(this).children("appiconsrc").text();

			            if(appiconname_value!=null && appiconname_value!="")
			            {
				            var str = '<img id="appiconimg" src="app_d.do?appscreenshoturl='+reiconname_value+'"/><input type="hidden" id="model.appiconname" name="model.appiconname" value="'+appiconname_value+'"/><input type="hidden" id="model.reiconname" name="model.reiconname" value="'+reiconname_value+'"/><input type="hidden" id="model.appiconsrc" name="model.appiconsrc" value="'+appiconsrc_value+'"/>';
				            document.getElementById("appicondiv").innerHTML=str;
					    }
			            
			            var appfilename_value=$(this).children("appfilename").text();
			            var refilename_value=$(this).children("refilename").text();
			            var appfilesrc_value=$(this).children("appfilesrc").text();

			            if(appfilename_value!=null && appfilename_value!="")
			            {
				            var str = appfilename_value+'<input type="hidden" id="model.appfilename" name="model.appfilename" value="'+appfilename_value+'"/><input type="hidden" id="model.refilename" name="model.refilename" value="'+refilename_value+'"/><input type="hidden" id="model.appfilesrc" name="model.appfilesrc" value="'+appfilesrc_value+'"/>';
				            document.getElementById("appfilediv").innerHTML=str;
					    }
			            
			            var appentry_value=$(this).children("appentry").text();
			            if(appentry_value!=null && appentry_value!="")
			            	document.getElementById("model.appentry").value=appentry_value;
			            var appremark_value=$(this).children("appremark").text();
			            if(appremark_value!=null && appremark_value!="")
			            	document.getElementById("model.appremark").value=appremark_value;

			            var appstatus_value=$(this).children("appstatus").text();
			            if(appstatus_value!=null && appstatus_value!="")
			            	document.getElementById("model.appstatus").value=appstatus_value;
			            
			        });   
			    } 
  	         });
		}
	}
	function imgdivon(deleteimgid,type)
    {
        if(type==0)
        {
			document.getElementById(deleteimgid).style.display="";  
        }
        if(type==1)
        {
        	document.getElementById(deleteimgid).style.display="none";  
        }
    }
    function deleteappscreenshot(id)
    {
        
        if (confirm("确定删除？"))
        {
           $.get("app_deletescreenshot.do?appscreenshotid="+id, 
           function(data) 
           { 
              if(data.indexOf('ok')>-1)
              {
            	  document.getElementById(id).parentNode.removeChild(document.getElementById(id));
              }
              
           });
        }
    }
    function reload(){
      	 jQuery().prepare_slider(); 
      	jQuery('#slider_list > li').over();
      	//=======intro================
      	var slider_link = jQuery('#right_but');
      	var slider_link_index = 1;
      	var slider_count = jQuery('#slider_list > li').size();	

      	function slider_intro(){
      		if(slider_link_index <= slider_count){
      			slider_link.trigger('click');
      			slider_link_index++;
      			setTimeout(function(){slider_intro()}, 6000); //select change time
      		}
      	}
      	setTimeout(function(){slider_intro()}, 6000)
       //===============
      	
      	jQuery('#left_but').hover(
      	   function () {
      		 jQuery(this).addClass("over");
      	   },
      	   function () {
      		 jQuery(this).removeClass("over");
      	   })
      	
      	jQuery('#right_but').hover(
      	   function () {
      		 jQuery(this).addClass("over");
      	   },
      	   function () {
      		 jQuery(this).removeClass("over");
      	   })
      	
      	jQuery('.cms-home .products-grid li').hover(
      	   function () {
      		 jQuery(this).find('.product-name').stop(true, true).slideDown("slow");
      	   },
      	   function () {
      		 jQuery(this).find('.product-name').hide("slow");
      	   })
      }
	</script>
</head>
<body>
    <form  id="theForm"  method="post" name="theForm"
    onsubmit="return validate();" action="appchannelapk_save.do?type=<s:property value="type"/>">
    <input name="cpid" type="hidden" id="cpid"  value="<s:property value="cpid"/>"/>
    <input name="categoryparentid" type="hidden" id="categoryparentid"  value="<s:property value="categoryparentid"/>"/>
    <input name="appName" type="hidden" id="appName"  value="<s:property value="appName"/>"/>
    <h1>
        <span class="action-span"><a href="appchannelapk_list.do?appid=<s:property value="appid"/>&appversionid=<s:property value="appversionid"/>&channelid=<s:property value="channelid"/>&appname=<s:property value="appname"/>">渠道包列表</a></span> <span
            class="action-span1"><a href="mainframe.jsp">
                首页</a> </span><span id="search_id" class="action-span1">- 渠道包管理 </span>
    </h1>
    <!-- start goods form -->
    <div class="tab-div">
        <!-- tab bar -->
        <div id="tabbar-div">
            <p>
                <span class="tab-front" id="general-tab">渠道包信息</span>
                <span class="tab-front"><a href="app_show1.do?type=channelapk&model.appnumber=<s:property value="model.appnumber"/>&channelapkid=<s:property value="model.id"/>">物料下载</a></span>
            </p>
        </div>
        <!-- tab body -->
        <div id="tabbody-div">
            <!-- 通用信息 -->
            <input type="hidden" name="appid" id="appid" value="<s:property value="appid"/>"/>
            <input type="hidden" name="appversionid" id="appversionid" value="<s:property value="appversionid"/>"/>
            <input type="hidden" name="channelid" id="channelid" value="<s:property value="channelid"/>"/>
            <input type="hidden" name="appname" id="appname" value="<s:property value="appname"/>"/>
            
             <input type="hidden" name="model.createuser" id="model.createuser" value="<s:property value="model.createuser"/>"/>
             <input type="hidden" name="model.createdate" id="model.createdate" value="<s:property value="model.createdate"/>"/>
             <input type="hidden" name="model.appstatus" id="model.appstatus" value="<s:property value="model.appstatus"/>"/>
             <input type="hidden" name="model.appversionnumber" id="model.appversionnumber" value="<s:property value="model.appversionnumber"/>"/>
             <input type="hidden" name="model.id" id="model.id" value="<s:property value="model.id"/>"/>
             <input type="hidden" id="model.cpid" name="model.cpid" value="<s:property value="model.cpid"/>"/>
             <input type="hidden" id="model.categoryparentid" name="model.categoryparentid" value="<s:property value="model.categoryparentid"/>"/>
             <input type="hidden" id="model.categoryid" name="model.categoryid" value="<s:property value="model.categoryid"/>"/>
           <input id="model.channelapknumber" name="model.channelapknumber" value="<s:property value="model.channelapknumber" />" type="hidden" />
            <s:if test='msg!=null&&"wl".equals(msg)'>
            <s:iterator value="aslist" status="i">
				<s:if test='"0".equals(type)'>
			  		<s:set name="tmp_icon" value="true" />
			 	</s:if>
			  	<s:if test='"1".equals(type)'>
			  		<s:set name="tmp_remark" value="true" />
			  	</s:if>
			  	<s:if test='"2".equals(type)'>
			  		<s:set name="tmp_screenshot" value="true" />
			  	</s:if>
			  	<s:if test='"3".equals(type)'>
			  		<s:set name="tmp_other" value="true" />
			  	</s:if>
			  	<s:if test='"4".equals(type)'>
			  		<s:set name="tmp_apk" value="true" />
			  	</s:if>
			  </s:iterator>
            <table width="90%" id="general-table" align="center">
				<tr>
					<td class="label2">上传游戏：</td>
					<td>
						<form>
							<div id="queue"></div>
							<input id="appfile" name="appfile" type="file" />
						</form> 
						<script type="text/javascript">
							$(function() {
								$('#appfile')
									.uploadify(
											{
												'formData' : {
													'timestamp' : '321',
													'model.appnumber':'<s:property value="model.appnumber" />',
													'model.appversionnumber':'<s:property value="model.appversionnumber" />',
													'model.channelapknumber':'<s:property value="model.channelapknumber" />'
												},
												'swf' : 'js/jquery/uploadify/uploadify.swf',
												'uploader' : 'appchannelapk_uploadapp.do',
												'buttonText' : '上传游戏...',
												'fileSizeLimit' : '100MB',
												'fileTypeDesc' : 'Apk Files',
												'fileTypeExts' : '*.apk',
												'successTimeout': 3000,
												'onUploadSuccess' : function(file,data,response) {
													var div = document.getElementById("appfilediv");
													var divv = div.innerHTML;
													if(divv.indexOf("无")!=-1){
														div.innerHTML = data;
													}else{
														div.innerHTML = divv+"&nbsp;"+data;
													}
												},
												'cancel' : 'false'
											});
							});
						</script>
					</td>
				</tr>
				<tr>
					<td class="label2"></td>
					<td>
						<div id="appfilediv">
							<s:if test="tmp_apk">
							 <s:iterator  value="aslist" status="i">
                        		<s:if test='"4".equals(type)'>
                       			<div class="imgDiv<s:property value="id"/>" onmouseover="imgdivon('deleteimg<s:property value="id"/>','0')" onmouseout="imgdivon('deleteimg<s:property value="id"/>','1')" style="display : inline-block;position : relative;">
						    		<a id="<s:property value="id"/>" target="_blank" href="app_downscreenshot.do?appscreenshotid=<s:property value="id" />" ><s:property value="imgname" /></a>
						    		<a href="javascript:void(0);" onclick="deleteappscreenshot('<s:property value="id"/>')">
										<img id="deleteimg<s:property value="id"/>" src="images/xxxxx.PNG" class="delete" style="position : absolute;top : 0px;right : 0px;width : 15px;height : 15px;display:none;"/>
						    		</a>
								</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								</s:if>
                       		</s:iterator>
                       		</s:if>
                       		<s:else>无</s:else>
						</div>
					</td>
				</tr>
				<tr>
					<td class="label2">上传图标：</td>
					<td>
						<form>
							<div id="queue"></div>
							<input id="iconfile" name="iconfile" type="file" />
						</form> 
						<script type="text/javascript">
							$(function() {
								$('#iconfile')
										.uploadify(
												{
													'formData' : {
														'timestamp' : '321',
														'model.appnumber':'<s:property value="model.appnumber" />',
														'model.appversionnumber':'<s:property value="model.appversionnumber" />',
														'model.channelapknumber':'<s:property value="model.channelapknumber" />'
													},
													'swf' : 'js/jquery/uploadify/uploadify.swf',
													'uploader' : 'appchannelapk_uploadicon.do',
													'buttonText' : '上传图标...',
													'fileTypeDesc' : 'Image Files',
													'fileTypeExts' : '*.gif; *.jpg; *.png',
													'successTimeout': 3000,
													'onUploadSuccess' : function(file, data,response) {
														var div = document.getElementById("appicondiv");
														var divv = div.innerHTML;
														if(divv.indexOf("无")!=-1){
															div.innerHTML = data;
														}else{
															div.innerHTML = divv+"&nbsp;"+data;
														}
													},
													'cancel' : 'false'
												});
							});
						</script>
					</td>
				</tr>
				<tr>
					<td class="label2"></td>
					<td>
						<div id="appicondiv">
						<s:if test="tmp_icon">
					 	<s:iterator  value="aslist" status="i">
                      		<s:if test='"0".equals(type)'>
                      			<div class="imgDiv<s:property value="id"/>" onmouseover="imgdivon('deleteimg<s:property value="id"/>','0')" onmouseout="imgdivon('deleteimg<s:property value="id"/>','1')" style="display : inline-block;position : relative;">
									<img style="width:100px;heigth:100px" id="<s:property value="id"/>" src="app_d.do?appscreenshoturl=icon/<s:property value="imgrename"/>"/>
						    		<a href="javascript:void(0);" onclick="deleteappscreenshot('<s:property value="id"/>')">
										<img id="deleteimg<s:property value="id"/>" src="images/xxxxx.PNG" class="delete" style="position : absolute;top : 0px;right : 0px;width : 20px;height : 20px;display:none;"/>
						    		</a>
						    		<div id="filename<s:property value="id"/>" style="clear:both;text-align:center;margin: 3px 0px 3px 0px"><a title="点击下载" href="app_downscreenshot.do?appscreenshotid=<s:property value="id" />" target="_blank"><s:property value="imgname" /></a></div>
								</div>
							</s:if>
                      		</s:iterator>
                      		</s:if><s:else>无</s:else>
                          </div>
					</td>
				</tr>
				<tr>
                      <td style="vertical-align: top;" class="label2">游戏描述： </td>
                      <td>
                      <s:if test="isUpdate.equals('true')">
                      	<form>
						<div id="queue"></div>
						<input id="remarkfile" name="remarkfile" type="file"/>
					</form>
					<script type="text/javascript">
						$(function() {
							$('#remarkfile').uploadify({
								'formData'     : {
									'timestamp' : '321',
									'model.appnumber':'<s:property value="model.appnumber"/>',
									'model.appversionnumber':'<s:property value="model.appversionnumber"/>',
									'model.channelapknumber':'<s:property value="model.channelapknumber" />'
								},
								'swf'      : 'js/jquery/uploadify/uploadify.swf',
								'uploader' : 'appchannelapk_uploadremark.do',
								'buttonText' : '上传描述...',
								'fileTypeDesc' : 'Text Files',
						        'fileTypeExts' : '*.txt',
						        'successTimeout': 3000,
								'onUploadSuccess' : function(file, data, response) {
									var div = document.getElementById("appremarkdiv");
									var divv = div.innerHTML;
							        div.innerHTML = divv+"&nbsp;"+data;
							    }
							    ,
							    'cancel':'false'
							});
						});
					</script>
					</s:if>
					 <div id="appremarkdiv">
					 <s:if test="tmp_remark">
					 	<s:iterator  value="aslist" status="i">
                      		<s:if test='"1".equals(type)'>
                      			<div class="imgDiv<s:property value="id"/>" onmouseover="imgdivon('deleteimg<s:property value="id"/>','0')" onmouseout="imgdivon('deleteimg<s:property value="id"/>','1')" style="display : inline-block;position : relative;">
					    		<a id="<s:property value="id"/>" target="_blank" href="app_d.do?model.refilename=remark.txt&appscreenshoturl=remark/<s:property value="imgrename"/>" ><s:property value="imgname" /></a>
					    		<a href="javascript:void(0);" onclick="deleteappscreenshot('<s:property value="id"/>')">
									<img id="deleteimg<s:property value="id"/>" src="images/xxxxx.PNG" class="delete" style="position : absolute;top : 0px;right : 0px;width : 15px;height : 15px;display:none;"/>
					    		</a>
							</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</s:if>
                      		</s:iterator>
                      		</s:if><s:else>无</s:else>
                          </div>
                          <br />
                      </td>
                  </tr>
                  <tr>
                      <td style="vertical-align: top;" class="label2">游戏截图： </td>
                      <td>
                      <s:if test="isUpdate.equals('true')">
                          <form>
						<div id="queue"></div>
						<input id="filescreenshot" name="filescreenshot" type="file"/>
					</form>
				
					<script type="text/javascript">
						$(function() {
							$('#filescreenshot').uploadify({
								'formData'     : {
									'timestamp' : '321',
									'model.appnumber':'<s:property value="model.appnumber"/>',
									'model.appversionnumber':'<s:property value="model.appversionnumber"/>',
									'model.channelapknumber':'<s:property value="model.channelapknumber" />'
								},
								'swf'      : 'js/jquery/uploadify/uploadify.swf',
								'uploader' : 'appchannelapk_uploadscreenshot.do',
								'buttonText' : '添加截图...',
								'fileTypeDesc' : 'Image Files',
						        'fileTypeExts' : '*.gif; *.jpg; *.png',
						        'successTimeout': 3000,
								'onUploadSuccess' : function(file, data, response) {
									var div = document.getElementById("filescreenshotdiv");
							        div.innerHTML = data;
							        reload();
							    }
							    ,
							    'cancel':'false'
							});
						});
					</script>
					</s:if>
                      </td>
                  </tr>
                  <tr>
                      <td class="label2"> </td>
                      <td>
                      	<div id="filescreenshotdiv">
                      		<jsp:include page="_uploadscreenshot.jsp" />
                      	</div>
                      </td>
                  </tr>
                  <tr>
                      <td style="vertical-align: top;" class="label2">其他： </td>
                      <td>
                      <s:if test="isUpdate.equals('true')">
                      	<form>
						<div id="queue"></div>
						<input id="remark1file" name="remarkfile" type="file"/>
					</form>
					<script type="text/javascript">
						$(function() {
							$('#remark1file').uploadify({
								'formData'     : {
									'timestamp' : '321',
									'model.appnumber':'<s:property value="model.appnumber"/>',
									'model.appversionnumber':'<s:property value="model.appversionnumber"/>',
									'model.channelapknumber':'<s:property value="model.channelapknumber" />'
								},
								'swf'      : 'js/jquery/uploadify/uploadify.swf',
								'uploader' : 'appchannelapk_uploadremark1.do',
								'buttonText' : '其他...',
						        'successTimeout': 3000,
								'onUploadSuccess' : function(file, data, response) {
									var div = document.getElementById("appremark1div");
									var divv = div.innerHTML;
									if(divv.indexOf("无")!=-1){
										div.innerHTML = data;
									}else{
										div.innerHTML = divv+"&nbsp;"+data;
									}
							    }
							    ,
							    'cancel':'false'
							});
						});
					</script>
					</s:if>
					 <div id="appremark1div">
					 <s:if test="tmp_other">
					 	<s:iterator  value="aslist" status="i">
                      		<s:if test='"3".equals(type)'>
                      			<div class="imgDiv<s:property value="id"/>" onmouseover="imgdivon('deleteimg<s:property value="id"/>','0')" onmouseout="imgdivon('deleteimg<s:property value="id"/>','1')" style="display : inline-block;position : relative;">
					    		<a id="<s:property value="id"/>" target="_blank" href="app_d.do?model.refilename=<s:property value="imgname" />&appscreenshoturl=remark1/<s:property value="imgrename"/>" ><s:property value="imgname" /></a>
					    		<a href="javascript:void(0);" onclick="deleteappscreenshot('<s:property value="id"/>')">
									<img id="deleteimg<s:property value="id"/>" src="images/xxxxx.PNG" class="delete" style="position : absolute;top : 0px;right : 0px;width : 15px;height : 15px;display:none;"/>
					    		</a>
							</div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						</s:if>
                      		</s:iterator>
                      		</s:if><s:else>无</s:else>
                          </div>
                          <br />
                      </td>
                  </tr>
			</table>
            </s:if>
            <s:else>
            <table width="90%" id="general-table" align="center">
                <tbody>
                	<tr>
                        <td class="label2">游戏：</td>
                        <td>
                            <select id="model.appnumber" name="model.appnumber" dojoType="dijit.form.FilteringSelect" onchange="changeapp()">
					               <option value="">--请选择--</option>
					               <s:iterator value="applist" status="stat">
					               <option value="<s:property value="appnumber" />" <s:if test="appnumber.equals(model.appnumber)">selected</s:if>><s:property value="appname" /></option>
					               </s:iterator>
					             </select>
                            <span class="require-field">*</span><span id="CompareValidator1" style="color:Red;visibility:hidden;">不能为空</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="label2">发行版本：</td>
                        <td>
                        	<div id="appversiondiv">
                            <select id="model.appversionid" name="model.appversionid" onchange="changeappversion()">
					               <option value="-1">--请选择--</option>
					               <s:iterator value="appversionlist" status="stat">
					               <option value="<s:property value="id" />" <s:if test="id.equals(model.appversionid)">selected</s:if>><s:property value="appname" /></option>
					               </s:iterator>
					             </select>
                            <span class="require-field">*</span><span id="CompareValidator2" style="color:Red;visibility:hidden;">不能为空</span>
                        	</div>
                        </td>
                    </tr>
                    <tr>
                        <td class="label2">渠道包名称：</td>
                        <td>
                            <input type="text" name="model.appname" id="model.appname" value="<s:property value="model.appname"/>" style="float: left;
                                " size="30" />
                            <span class="require-field">*</span>&nbsp;
                        <span id="CompareValidator3" style="color:Red;visibility:hidden;">不能为空</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="label2">包名：</td>
                        <td>
                            <input type="text" name="model.apppackage" id="model.apppackage" value="<s:property value="model.apppackage"/>" style="float: left;
                                " size="30" />
                            <span class="require-field">*</span><span id="CompareValidator4" style="color:Red;visibility:hidden;">不能为空</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="label2">版本：</td>
                        <td>
                            <input type="text" name="model.appversion" id="model.appversion" value="<s:property value="model.appversion"/>" style="float: left;
                                " size="30" />
                        </td>
                    </tr>
                    <input type="hidden" name="model.appentry" id="model.appentry" value="<s:property value="model.appentry"/>" style="float: left;" size="30" />
                    <tr>
                        <td class="label2">渠道：</td>
                        <td>
                            <select id="model.channelid" name="model.channelid" dojoType="dijit.form.FilteringSelect" onchange="changechannel()">
					               <option value="-1">--请选择--</option>
					               <s:iterator value="channellist" status="stat">
					               <option value="<s:property value="id" />" <s:if test="id.equals(model.channelid)">selected</s:if>><s:property value="name" /></option>
					               </s:iterator>
					             </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="label2">渠道包ID：</td>
                        <td><input size="30" name="model.channelapkid" id="model.channelapkid" value="<s:property value="model.channelapkid" />" /></td>
                    </tr>
                    <!--tr>
                        <td class="label2">项目：</td>
                        <td>
                        	<div id="projectdiv">
                            <select id="model.projectid" name="model.projectid">
					               <option value="-1">--请选择--</option>
					               <s:iterator value="projectlist" status="stat">
					               <option value="<s:property value="id" />" <s:if test="id.equals(model.projectid)">selected</s:if>><s:property value="name" /></option>
					               </s:iterator>
					             </select>
					       </div>
                        </td>
                    </tr-->
                    <tr>
                    	<td class="label2" colspan="2">
                    	 <s:if test="isUpdate.equals('true')">
				            <div class="button-div">
				                <input type="submit" value=" 确定 " class="button" />
				                <input type="reset" value=" 重置 " class="button" />
				            </div>
				            </s:if>
                    	</td>
                    </tr>
                </tbody>
            </table>
            <input type="hidden" id="model.appfilename"	name="model.appfilename" value="<s:property value="model.appfilename"/>" />
			<input type="hidden" id="model.refilename" name="model.refilename" value="<s:property value="model.refilename"/>" /> 
			<input type="hidden" id="model.appfilesrc" name="model.appfilesrc" value="<s:property value="model.appfilesrc"/>" />
            </s:else>
            <!-- 通用信息end -->
        </div>
    </div>
    <!-- end goods form -->
    </form>
    <script type="text/javascript" src="js/tab.js"></script>
    <script type="text/javascript" src="js/validator.js"></script>
</body>
</html>
